from settings import WeChatPublicPlatform, MessageTemplate

# 初始化微信公众平台配置
wx = WeChatPublicPlatform()

allUserInfo = {
    "刘雷": {
        "userOpenId": "oxy8F5wQX6FTxf7ryMXMiDpjunEQ",
        "templateMethodKwargs": {
            'username': "22204055",
            'password': "Ll430621+-",
            "studentName": "刘雷",
        }
    }
}

name = "刘雷"
userInfo = allUserInfo["刘雷"]

kwargs = {
    "userOpenID": userInfo["userOpenId"],
    "templateMethod": MessageTemplate.tomorrowTimeTable,
}
kwargs.update(userInfo["templateMethodKwargs"])

wx.sendMsg(**kwargs)
